<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
            /* 以下三个从IE7开始加兼容 */
            /* 子选择器，只能选儿子：   div>p   div的s所有儿子标签p */
            /* 相邻兄弟选择器：         img+p   img后面紧跟着的1个p被选中 */
            /* 通用兄弟选择器：         p~span  p后面所有同级的span */
            .box>p{color: red;}
            img+span{color: green;}
            h3~span{font-style: italic;}
    </style>
</head>
<body>
    <div class="box">
        <p>1111111</p>
        <p>1111111</p>
        <p>1111111</p>
        <p>1111111</p>
        <div>
            <p>22222</p>
            <p>22222</p>
            <p>22222</p>
        </div>
    </div>
    <p>33333</p>


    <p>
        <img src="10.png" alt="">
        <span>11111</span>
        <span>22222</span>
    </p>
    <span>22222</span>


    <h3>555555</h3>
    <span>11111</span>
    <span>11111</span>
    <p>22222</p>
    <span>11111</span>
    <p><span>22222</span></p>
</body>
</html>